Skip to main content
Version: Upcoming

CurrencyPositionRecordV5

V8 Message Definiton

CurrencyPositionRecords are live risk records that contain start-of-day positions and all subsequent transactions. These records are published by a CoreRiskServer and represent the position and risk markup detail for a single currency. New records are published immediately when a position changes and about once per minute if no position has changed.

METADATA

AttributeValue
Topic4740-risk-v5
MLink TokenClientRisk
ProductSRRisk
accessTypeSELECT

Table Definition

FieldTypeKeyDefault ValueComment
currencyenum - CurrencyPRI'None'
accntVARCHAR(16)PRI''
tradeDateDATEPRI'1900-01-01'
clientFirmVARCHAR(16)PRI''SR assigned client firm
mnyOpnPosPrvINT0startofday SR currency position rotated from prior day record
mnyOpnPosClrINT0startofday CLR currency position supplied by clientclearing firm via clearing position load
mnyOpnPosINT0start of period currency position effective can be from either CLR or SR
mnyOpnPosSrcenum - PositionSource'None'start of period position source
mnyBotINT0currency units bot today
mnySldINT0currency units sld today
numExecutionsINT0number of currency transactions included in mnyBot and mnySld today
maxExecDttmDATETIME(6)'1900-01-01 00:00:00.000000'max timestamp of included currency transaction records
timestampDATETIME(6)'1900-01-01 00:00:00.000000'

PRIMARY KEY DEFINITION (Unique)

FieldSequence
currency1
accnt2
tradeDate3
clientFirm4

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRRisk`.`MsgCurrencyPositionRecordV5` (
`currency` ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') NOT NULL DEFAULT 'None',
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`tradeDate` DATE NOT NULL DEFAULT '1900-01-01',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR assigned client firm',
`mnyOpnPosPrv` INT NOT NULL DEFAULT 0 COMMENT 'start-of-day SR currency position (rotated from prior day record)',
`mnyOpnPosClr` INT NOT NULL DEFAULT 0 COMMENT 'start-of-day CLR currency position (supplied by client/clearing firm via clearing position load)',
`mnyOpnPos` INT NOT NULL DEFAULT 0 COMMENT 'start of period currency position (effective; can be from either CLR or SR)',
`mnyOpnPosSrc` ENUM('None','Zero','SR','CLR') NOT NULL DEFAULT 'None' COMMENT 'start of period position source',
`mnyBot` INT NOT NULL DEFAULT 0 COMMENT 'currency units bot today',
`mnySld` INT NOT NULL DEFAULT 0 COMMENT 'currency units sld today',
`numExecutions` INT NOT NULL DEFAULT 0 COMMENT 'number of currency transactions included in mnyBot and mnySld today',
`maxExecDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'max (timestamp) of included currency transaction records',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`currency`,`accnt`,`tradeDate`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='CurrencyPositionRecords are live risk records that contain start-of-day positions and all subsequent transactions.\nThese records are published by a CoreRiskServer and represent the position and risk markup detail for a single currency.\nNew records are published immediately when a position changes and about once per minute if no position has changed.';

SELECT TABLE EXAMPLE QUERY

SELECT
`currency`,
`accnt`,
`tradeDate`,
`clientFirm`,
`mnyOpnPosPrv`,
`mnyOpnPosClr`,
`mnyOpnPos`,
`mnyOpnPosSrc`,
`mnyBot`,
`mnySld`,
`numExecutions`,
`maxExecDttm`,
`timestamp`
FROM `SRRisk`.`MsgCurrencyPositionRecordV5`
WHERE
/* Replace with a ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') */
`currency` = 'None'
AND
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a DATE */
`tradeDate` = '2022-01-01'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

Doc Columns Query

SELECT * FROM SRRisk.doccolumns WHERE TABLE_NAME='CurrencyPositionRecordV5' ORDER BY ordinal_position ASC;